home *** CD-ROM | disk | FTP | other *** search
/ Georgia Wildfire Prevention / Georgia Wildfire Prevention.iso / pc / media / dirs / BackUp / Home.dir / 00008_Script_MovieTimer Behavior < prev    next >
Text File  |  2002-10-15  |  1KB  |  52 lines

  1. --MOVIETIMER--
  2. --Attach to movie so it can send messages to the sprites letting them know which movie is playing and how far along it is.
  3.  
  4. property SpNum, MyNum, MyName, CurrentMovie, Guard
  5.  
  6. --Captures the spritenumber, etc.
  7. on new me
  8.   SpNum = me.spritenum
  9.   MyNum=sprite(SpNum).member.number
  10.   MyName=member(MyNum).name
  11.   CurrentMovie = "Zone"
  12.   guard = 0
  13. end
  14.  
  15. --Sends the movie time to the sprites.
  16. on prepareframe me
  17.   if guard = 0 then
  18.     sendallsprites(#FireUp) --initializes the sprites.
  19.     guard = 1
  20.   end if
  21.   
  22.   set TheTime = sprite(Spnum).movietime
  23.   if TheTime = member(CurrentMovie).duration then
  24.     case (CurrentMovie) of
  25.       "Zone" : CurrentMovie = "Leaves"
  26.       "Leaves" : CurrentMovie = "MowGrass"
  27.       "MowGrass" : CurrentMovie = "TrimTrees"
  28.       "TrimTrees" : CurrentMovie = "Firewood"
  29.       "Firewood" : CurrentMovie = "Landscaping"
  30.       "Landscaping" : CurrentMovie = "Roofing"
  31.       "Roofing" : CurrentMovie = "SmokeDetector"
  32.       "SmokeDetector" : CurrentMovie = "BurningDebris"
  33.       "BurningDebris" : CurrentMovie = "PrescribedBurns"
  34.       "PrescribedBurns" : CurrentMovie = "KeepTools"
  35.       "KeepTools" : CurrentMovie = "Address"
  36.       "Address" : CurrentMovie = "Precautions"
  37.     end case
  38.     sprite(SpNum).membernum = member(CurrentMovie).number
  39.   end if
  40.   sendallsprites(#countercheck, TheTime, CurrentMovie)
  41.   updateStage
  42. end
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.